import request from '@/utils/request'

// 查询成品仓库档案列表
export function listBizProductWarehouse (query) {
  return request({
    url: '/biz/bizProductWarehouse/list',
    method: 'get',
    params: query
  })
}

// 查询成品仓库档案详细
export function getBizProductWarehouse (id) {
  return request({
    url: '/biz/bizProductWarehouse/' + id,
    method: 'get'
  })
}

// 新增成品仓库档案
export function addBizProductWarehouse (data) {
  return request({
    url: '/biz/bizProductWarehouse',
    method: 'post',
    data: data
  })
}

// 修改成品仓库档案
export function updateBizProductWarehouse (data) {
  return request({
    url: '/biz/bizProductWarehouse',
    method: 'put',
    data: data
  })
}

// 删除成品仓库档案
export function delBizProductWarehouse (id) {
  return request({
    url: '/biz/bizProductWarehouse/' + id,
    method: 'delete'
  })
}

// 校验位置是否存在
export function checkPostionUnique (id, postion) {
  if (id === undefined) {
    id = ''
  }
  return request({
    url: '/biz/bizProductWarehouse/checkPostionUnique/' + postion + '/' + id,
    method: 'get'
  })
}

// 导出成品仓库档案
export function exportBizProductWarehouse (query) {
  return request({
    url: '/biz/bizProductWarehouse/export',
    method: 'get',
    params: query
  })
}

// 获取初始化数据
export function getInitData (dictTypes) {
  return request({
    url: '/biz/bizProductWarehouse/getInitData/' + dictTypes,
    method: 'get'
  })
}
